package android.medicalcloud.com.yiapp.yilian.service;

import android.content.Context;
import android.medicalcloud.com.yiapp.base.cach.PreferceManager;
import android.medicalcloud.com.yiapp.base.utils.StringTools;
import android.medicalcloud.com.yiapp.yilian.logic.PushController;
import android.util.Log;

import com.igexin.sdk.GTIntentService;
import com.igexin.sdk.message.GTCmdMessage;
import com.igexin.sdk.message.GTTransmitMessage;

/**
 * Created by wanggenlin on 17-5-23.
 */
public class PushIntentService extends GTIntentService {
    public PushIntentService() {
    }
    @Override
    public void onReceiveServicePid(Context context, int pid) {
    }
    @Override
    public void onReceiveMessageData(Context context, GTTransmitMessage msg) {
    }
    @Override
    public void onReceiveClientId(Context context, String clientid) {
        Log.e(TAG, "onReceiveClientId -> " + "clientid = " + clientid);
        if (StringTools.isNullOrEmpty(clientid)){
            return;
        }
        PreferceManager.getInsance().saveValueBYkey("gtId",clientid);
        PushController.getInstance().bind();

    }
    @Override
    public void onReceiveOnlineState(Context context, boolean online) {
    }
    @Override
    public void onReceiveCommandResult(Context context, GTCmdMessage cmdMessage) {
    }

}
